Automatically Inferring Properties of Computer Programs Automatically Inferring Properties of Computer Programs

نویسندگان

  • Robert Lawrence Givan
  • David Allen McAllester
چکیده

This thesis presents two independent pieces of research. First, we consider the problem of automatically inferring properties of programs. Our approach is to explore the application of familiar type inference principles to a \type system" suuciently expressive that the typing problem is eeectively the checking of program speciications. We present such a type system, and use familiar syntax-directed type inference rules to give a polynomial-time procedure for inferring type theorems in this type system. We discuss examples of simple functional programs and the speciication information this procedure automatically infers. The enriched notion of type allows the deenition of any recursively enumerable set as a type, and includes argument-dependent output types for functions. The inference procedure is capable for example of automatically inferring that an insertion sort program always returns a sorted permutation of its input. We present both rst-order and higher-order versions of our sample programming language and inference algorithms for both languages. We believe most of the interesting inferential challenges are already present in the rst-order case. The second piece of research we present addresses the satissability of sets of formulas in a particular set constraints language. We consider set expressions built up from set constants by union, set complement, and taking the image of a set expression under a function or relation. Previous work in this area has neglected the \Tarskian" case where the functions and relations are allowed to take on arbitrary meanings, rather than only a standard Herbrand meaning. We prove that the satissability of a nite set of subset formulas between these \Tarskian" set expressions is in nondeter-ministic doubly exponential time. Our proof is by reduction to a new Diophantine inequation solvability problem, which we show to be in nondeterministic exponential time, but conjecture to be in NP.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Inferring Program Specifications in Polynomial-Time

We consider the problem of automatically inferring properties of programs. Our approach is to explore the application of familiar type inference principles to a \type system" suuciently expressive that the typing problem is eeectively the checking of program speciications. We use familiar syntax-directed type inference rules to give a polynomial-time procedure for inferring type theorems in thi...

متن کامل

On Template-Based Inference of Rich Invariants in Leon

We present an approach for inferring rich invariants involving user-defined recursive functions over numerical and algebraic data types. In our approach, the developer provides the desired shape of the invariant using a set of templates. The templates are quantifier-free affine predicates with unknown coefficients. We also provide an enumeration based strategy for automatically inferring some o...

متن کامل

Inferring Synchronization under Limited Observability

This paper addresses the problem of automatically inferring synchronization for concurrent programs. Given a program and a specification, we infer synchronization that avoids all interleavings violating the specification, but permits as many valid interleavings as possible. We let the user specify an upper bound on the cost of synchronization, which may limit the observability — what observatio...

متن کامل

Obvious Properties of Computer Programs

We explore the question of what properties of LISP programs can be made \obvious" to a computer system. We present a polynomial-time algorithm for inferring interesting properties of pure LISP programs. Building on previous work in knowledge representation for rapid inference, we present a language for representing properties of programs. We treat properties as generalized types, i.e., sets of ...

متن کامل

Inferring Min and Max Invariants Using Max-Plus Polyhedra

We introduce a new numerical abstract domain able to infer min and max invariants over the program variables, based on max-plus polyhedra. Our abstraction is more precise than octagons, and allows to express non-convex properties without any disjunctive representations. We have defined sound abstract operators, evaluated their complexity, and implemented them in a static analyzer. It is able to...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2012